diff options
| author | Adam Soltys <[email protected]> | 2024-02-22 13:35:50 -0800 |
|---|---|---|
| committer | Adam Soltys <[email protected]> | 2024-02-22 13:35:50 -0800 |
| commit | 8d33c5fe90f731f0c4326ca787cb1150ac46fcd9 (patch) | |
| tree | b2c8696826ec6c5314bfa5ea64cb76ce7f87cbd4 /src/routes/(app)/[username] | |
| parent | 5be878fdbb5052501bf894b45627a7bd209ff053 (diff) | |
| download | coinos-ui-8d33c5fe90f731f0c4326ca787cb1150ac46fcd9.tar.gz coinos-ui-8d33c5fe90f731f0c4326ca787cb1150ac46fcd9.zip | |
send to tip page
Diffstat (limited to 'src/routes/(app)/[username]')
5 files changed, 15 insertions, 9 deletions
diff --git a/src/routes/(app)/[username]/(profile)/+page.svelte b/src/routes/(app)/[username]/(profile)/+page.svelte index bf1090aa..0fbe90ab 100644 --- a/src/routes/(app)/[username]/(profile)/+page.svelte +++ b/src/routes/(app)/[username]/(profile)/+page.svelte @@ -77,6 +77,7 @@ amount: btc(total, rate), currency, items: items.filter((i) => i.quantity > 0), + prompt: subject.prompt, rate, }; @@ -85,7 +86,7 @@ user: { username: subject.username }, }); - goto(`/${subject.username}/invoice/${id}?options=true`, { + goto(`/${subject.username}/invoice/${id}`, { invalidateAll: true, }); }; diff --git a/src/routes/(app)/[username]/invoice/[id]/+page.svelte b/src/routes/(app)/[username]/invoice/[id]/+page.svelte index dca98c39..56feced6 100644 --- a/src/routes/(app)/[username]/invoice/[id]/+page.svelte +++ b/src/routes/(app)/[username]/invoice/[id]/+page.svelte @@ -51,7 +51,6 @@ user: { username, currency }, } = invoice; - let qr; let tipPercent = 0; @@ -93,7 +92,7 @@ let subbed; onMount(async () => { - $showQr = $showQr && 1 + $showQr = $showQr && 1; if (browser) { last.subscribe((v) => { if (!v || subbed) return; @@ -146,7 +145,10 @@ {#each invoice.items as i} <div class="grid grid-cols-4 text-xl"> - <div class="mr-auto grow col-span-2"><span class="mr-2">{i.quantity}</span> {i.name}</div> + <div class="mr-auto grow col-span-2"> + <span class="mr-2">{i.quantity}</span> + {i.name} + </div> <div class="font-semibold text-right"> {f(i.price * i.quantity, currency)} </div> @@ -181,7 +183,6 @@ </div> {/if} - <button type="button" class="flex gap-2 text-center break-all rounded-2xl hover:opacity-80 py-5 px-6 w-full mx-auto justify-center border bg-black text-white text-xl whitespace-nowrap" @@ -193,7 +194,9 @@ </div> </button> - <div class="w-full flex justify-center gap-2 flex-wrap text-secondary text-xl"> + <div + class="w-full flex justify-center gap-2 flex-wrap text-secondary text-xl" + > <a href={link} class="w-full"> <button class="w-full flex justify-center rounded-2xl border py-5 px-6 hover:opacity-80" @@ -226,7 +229,6 @@ <!-- > --> </div> - <div class="flex justify-around text-secondary"> <button class="hover:bg-primary my-auto flex gap-1 sm:gap-2 py-3 px-2 sm:px-5 w-full justify-center" diff --git a/src/routes/(app)/[username]/invoice/[id]/tip/+page.svelte b/src/routes/(app)/[username]/invoice/[id]/tip/+page.svelte index 02a896b2..10fbb239 100644 --- a/src/routes/(app)/[username]/invoice/[id]/tip/+page.svelte +++ b/src/routes/(app)/[username]/invoice/[id]/tip/+page.svelte @@ -61,6 +61,7 @@ let { amount, hash, + items, type, rate, received, @@ -82,6 +83,7 @@ ({ amount, hash, + items, type, received, prompt, @@ -116,6 +118,7 @@ <input type="hidden" name="prompt" value="false" /> <input type="hidden" name="type" value={type} /> <input type="hidden" name="hash" value={hash} /> + <input type="hidden" name="items" value={items} /> <input type="hidden" name="request_id" value={invoice.request?.id} /> diff --git a/src/routes/(app)/[username]/settings/[...tab]/+page.server.js b/src/routes/(app)/[username]/settings/[...tab]/+page.server.js index a2044767..5ff691f0 100644 --- a/src/routes/(app)/[username]/settings/[...tab]/+page.server.js +++ b/src/routes/(app)/[username]/settings/[...tab]/+page.server.js @@ -27,7 +27,7 @@ export const actions = { return fail(400, { message: e.message }); } - if (user.language) cookies.set("lang", user.language, { path: "/" }); + if (user.language) cookies.set("lang", user.language, { path: "/" }); return { user, success: true }; }, diff --git a/src/routes/(app)/[username]/settings/[...tab]/+page.svelte b/src/routes/(app)/[username]/settings/[...tab]/+page.svelte index f31f8cbb..cdbe0623 100644 --- a/src/routes/(app)/[username]/settings/[...tab]/+page.svelte +++ b/src/routes/(app)/[username]/settings/[...tab]/+page.svelte @@ -78,7 +78,7 @@ let data = new FormData(formElement); if (data.get("newNsec")) { - await setNsec(user, data.get("newNsec")); + await setNsec(user, data.get("newNsec")); data.set("nsec", user.nsec); data.set("pubkey", user.pubkey); } |
